export function searchColumns() {
  return [
    {
      filterable: true,
      type: 'select',
      prop: 'channel',
      placeholder: '请选择渠道号',
      dicData: this.channelList?.list,
      props: {
        value: 'no',
        label: 'no',
      },
    },
    {
      filterable: true,
      type: 'select',
      prop: 'film_name',
      placeholder: '请选择影片名称',
      dicData: this.movieArr,
    },
    {
      filterable: true,
      type: 'select',
      prop: 'link',
      placeholder: '请选择推广链接',
      dicData: this.linkArr,
    },
    {
      prop: 'dateRange',
      type: 'daterange',
    },
  ]
}

export function tableColumns() {
  return [
    {
      width: 140,
      label: '日期',
      prop: 'create_at',
      formatter: row => this.$formatTime(row.create_at),
    },
    {
      width: 160,
      align: 'left',
      overHidden: true,
      label: '推广链接',
      prop: 'link',
    },
    {
      overHidden: true,
      width: 200,
      align: 'left',
      label: '影片名称',
      prop: 'film_name',
    },
    {
      width: 100,
      label: '集名称',
      prop: 'film_episode_no',
    },
    {
      label: '影片状态',
      prop: 'status',
      html: true,
      formatter: row =>
        `<span class="${row?.status === 1 ? 'text-success' : 'text-danger'}">${
          row?.status === 1 ? '已上架' : '待上架'
        }</span>`,
    },
    {
      overHidden: true,
      width: 180,
      align: 'left',
      label: '推广渠道',
      prop: 'channel',
      formatter: row =>
        `${row?.channel_no ? row?.channel_no : '--'}/${
          row?.channel_merchant ? row?.channel_merchant : '--'
        }/${row?.channel_name ? row?.channel_name : '--'}/${
          row?.channel_alias ? row?.channel_alias : '--'
        }`,
    },
    {
      label: '渠道号',
      prop: 'channel_no',
    },
    {
      align: 'right',
      label: '链接点击次数',
      prop: 'click_total',
    },
    {
      align: 'right',
      label: '下载量',
      prop: 'download_total',
    },

    {
      align: 'right',
      label: '注册用户数',
      prop: 'register_total',
    },
    {
      align: 'right',
      label: '充值用户数',
      prop: 'recharge_user_count',
    },
    {
      align: 'right',
      label: '充值总金额',
      prop: 'recharge_amount',
    },
    {
      align: 'right',
      label: '充值笔数',
      prop: 'recharge_count',
    },
  ]
}
